import React, { Component } from 'react';
import { hashHistory } from 'react-router';
import { Grid } from 'antd-mobile';
import './homeNavigate.less';

class HomeNavigate extends Component{
	
	homeNavigateHandle = (el, index) => {
		if(index == 0){
			hashHistory.push("/bookClassify");
		}else if(index == 1){
			hashHistory.push("/bookSort");
		}else if(index == 2){
			// hashHistory.push("/bookActivity");
		}else if(index == 3){
			hashHistory.push("/bookFree");
		}
	}

	render(){
		return(
			<Grid className="homeNavigate" 
				hasLine={false}
				data={this.props.data} 
				onClick={(el, index) => this.homeNavigateHandle(el, index)}/>
		)
	}
}

export default HomeNavigate;